﻿using System.Collections.Generic;
using NHibernate;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository
{
    public  class LoansExtrainstallmentRepo  : BaseRepository <LoansExtrainstallment, int>
    {
        public LoansExtrainstallmentRepo(ISession session)
            : base(session)
        {
        }


        public List<LoansExtrainstallment> GetListByHeaderID(int headerId)
        {
            return new List<LoansExtrainstallment>(_session.QueryOver<LoansExtrainstallment>()
                .Where(x => x.LoansHeaderID == headerId)
                .OrderBy(x => x.CreateDate).Asc.List());
        }
    }
}
